﻿using UnityEngine;
using UnityEngine.UI;
using System;
using System.Collections;
using System.Collections.Generic;

public class BookDetails
{
    public string theCoverPath { get; set; }
	public string txtTitle { get; set; }
    public string txtAuthor { get; set; }
    public string txtProfile { get; set; }
	public string cellPath{ get; set;}
    public string cellParentName { get; set; }

	public void ResourcesCell(GameObject cell,Texture cover)
	{
		GameObject cellParent = GameObject.Find(cellParentName);
		cell.transform.SetParent (cellParent.transform);
		cell.GetComponent<RectTransform>().localScale = Vector3.one;

		cell.transform.Find("TxtTitle").GetComponent<Text>().text = txtTitle;
		cell.transform.Find("Author").GetComponent<Text>().text = txtAuthor;

		RawImage theCover = cell.transform.Find ("TheCover").GetComponent<RawImage> ();
		theCover.texture = cover;
	}

}
